total item 	= span id: count
total		= span id: total
disc		= span id: ds_con
tax			= span id: ts_con
grand total	= span id: total-payable

product-2G106:product2:Ayam Groreng Mentega
id:name:val,

product:quantity:price
items : [
{product:"G106",qty:"" },
{product:"G106",qty:"" },
{product:"G106",qty:"" }
]


<button class="del_row" id="del-'+count+last+'" value="'+item_price+'">
<i class="glyphicon glyphicon-remove-circle"></i></button>


<input type="hidden" class="code" name="product'+count+'" value="'+prod_name+'" id="product-'+count+last+'">
<button type="button" class="btn btn-warning btn-block btn-xs prod_name tip text-left" data-name="'+prod_name+'" id="'+count+last+'">
'+pName+'
</button>

<span class="printspan">'+prod_name+'</span>
<input class="keyboard nkb-input" name="quantity'+count+'" type="text" value="1" id="quantity-'+count+last+'" onclick="this.select();" autocomplete="off">
<input type="hidden" class="price" name="price'+count+'" value="'+item_price+'" id="price-'+count+last+'">
<span id="price_'+count+last+'">'+item_price+'</span>



{ "data" : [ { "contents" : "This is some content",
        "selector" : "DIV.subhead"
      },
      { "contents" : "some other content",
        "selector" : "LI:nth-child(1) A"
      }
    ],
  "page" : "about_us.php"
}




	<!-- 
	$("#submit").click(function(){
        alert('Form is submitting');
		scanning items into array : 
		var $inputs = jQuery('#saletbl :input');
		var values = {};
		$inputs.each(function() {
			alert(values[this.name] = jQuery(this).val());
		});
		jQuery('#nameOfDiv').submit();
		return false;	 
	});
	-->
	
//--- submit form :

$("submit").submit(function(e){

    e.preventDefault();

    var data = {}
    var Form = this;

    //Gathering the Data
    //and removing undefined keys(buttons)
    $.each(this.elements, function(i, v){
            var input = $(v);
        data[input.attr("name")] = input.val();
        delete data["undefined"];
    });

    //Form Validation goes here....

    //Save Form Data........
    $.ajax({
        cache: false,
        url : process.php?module=pos&view=payment,
        type: "POST",
        dataType : "json",
        data : JSON.stringify(data),
        context : Form,
        success : function(callback){
            //Where $(this) => context == FORM
            console.log(JSON.parse(callback));
            $(this).html("Success!");
        },
        error : function(){
            $(this).html("Error!");
        }
    });
